﻿#ifndef FULLDISKFORM_H
#define FULLDISKFORM_H

#include <QWidget>
#include "taskeditor.h"
#include "ui_fulldiskform.h"
#include "taskmanager.h"

namespace Ui {
class FullDiskForm;
}

class FullDiskForm : public QWidget,public TaskEditor
{
    Q_OBJECT

public:
    explicit FullDiskForm(QWidget *parent = 0);
    ~FullDiskForm();
    // TaskEditor interface
public:
    void generateTask(TaskItem *pTask);
    void setCurrentTask(const QString& sName);
    void setCurrentMode(int nMode);
    void updateTask(TaskItem *pTask);

private slots:
    void on_pushButton_CalPos_clicked();

    void on_pushButton_AddCycle_clicked();

    void on_pushButton_DeCycle_clicked();

    void on_comboBox_TimeAlign_currentIndexChanged(int index);

    void on_tableWidget_currentCellChanged(int currentRow, int currentColumn, int previousRow, int previousColumn);

private:
    Ui::FullDiskForm *ui;
    enum TableCol
    {
        Table_Name = 0,
        Table_EWStart,
        Table_EWEnd,
        Table_NSStart,
        Table_NSEnd,
        Table_STime,
        Table_MidTime,
        Table_ETime,
        Table_TotTime,
    };
};

#endif // FULLDISKFORM_H
